package socket;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] allout = {1,2,3,4,7,232,76,238,543,112};
        int pw = 232;
        System.out.println(Arrays.toString(allout));
        //将pw从数组allout中删除
        for (int i=0;i<allout.length;i++){
            if (allout[i] == pw){
                allout[i]=allout[allout.length-1];
                allout=Arrays.copyOf(allout,allout.length-1);
                break;
            }
        }

        System.out.println(Arrays.toString(allout));
    }
}
